#include "Wall.h"
#include "Engine.h"
#include "StageManager.h"

Wall::Wall(std::string file) {	
	m_model3Dfile = "../data/mesh/rooms/";
	m_model3Dfile += file;
}

Wall::~Wall() {
}

void Wall::init() {
	// Load wall model
	osg::PositionAttitudeTransform *transform = new osg::PositionAttitudeTransform;

	m_model3D = osgDB::readNodeFile(m_model3Dfile);
	m_model3D->accept(bbox);

	
	
	transform->addChild(m_model3D);

	StageManager::getInstance().getRootNode()->addChild(transform);
	
    ComputeBoundingBox b;
	transform->accept(b);
	bbox = b;
	
	bboxs = b.getBoundBoxs();
}


void Wall::update() {
	
}
